﻿@model DddCms.Presentation.Areas.DddCms.Models.UserViewModel.LoginModel
@using Web.Utility;
@using DddCms.Models.UIComponent.Form;
@using DddCms.Models.UIComponent.Window;
@{
    ViewBag.Title = "Login";
    Layout = "~/Views/Shared/_HomeLayout.cshtml";
}
<style>

.form-info-text-content
{
-webkit-border-horizontal-spacing: 0px;
-webkit-border-vertical-spacing: 0px;
background-color: transparent;
border-bottom-color: #303030;
border-bottom-style: none;
border-bottom-width: 0px;
border-collapse: collapse;
border-left-color: #303030;
border-left-style: none;
border-left-width: 0px;
border-right-color: #303030;
border-right-style: none;
border-right-width: 0px;
border-top-color: #303030;
border-top-style: none;
border-top-width: 0px;
color: #303030;
display: table-cell;
font-family: Tahoma;
font-size: 12px;
font-style: normal;
font-variant: normal;
font-weight: normal;
line-height: 50px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
overflow-x: visible;
overflow-y: visible;
padding-bottom: 10px;
padding-left: 0px;
padding-right: 0px;
padding-top: 0px;
vertical-align: middle;
width: 276px;
}
.form-message
{
}
.text-information-login
{
    height: 235px;
}
</style>
<script type="text/javascript">
    $(document).ready(function () {
        $(".window").window();
        $(".form").form();
        $(".tooltip").tooltip();
    });
</script>

@using (Html.BeginForm())
{
    string error = ViewBag.ErrorMessage;
    @FormHelpers.Form(f => f
    .Title("Idantification sur le site.")
    .Width("50%")
    .Height(247)
    .Position(WindowPositionViewModel.Left)
    .Error(error)
    .AddMessage( 
    @<span>Identifiez vous pour acceder au site.
        <br />
        @Html.ActionLink("Mot de passe oublié ?", "RemberPassword")
    </span>)
    .AddField(Html.Edit(m => m.UserName))
    .AddRow(rowas => rowas.AddField(Html.Edit(m => m.Password))))

    @WindowHelpers.WindowFunc(w => w
    .Width("49%")
    .Position(WindowPositionViewModel.Left)
    .Content(
        @<text>
        
               <center> <h2 style="height:35px;">Information</h2></center>
                @WindowHelpers.WindowFunc(ss => ss
                    .Style("form-message")
                    .Width("100%")
                    .Position(WindowPositionViewModel.FullSize)
                    .Content(
                        string.Format("<p class=\"text-information-login\" >Vous pouvez vous inscrire si vous n'avez pas déjà de compte.{0}</p>",
                        Html.ActionLink("Inscription", "Register"))))
            
          </text>))
}

@section Secondaire
{ 
    @WindowHelpers.WindowFunc(w => w
        .Title("Information")
        .MaxWidth(250)
        .Content(
            @<ul>
                <li>Vous etes entrain de vous loguer sur DddCms</li>
            </ul>))
}

@section JQueryDocumentReady
{
    <script type="text/javascript">
        $(document).ready(function () {
            $(".window").window();
            $(".form").form();
            $(".tooltip").tooltip();
        });
    </script>
}